/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.qinyetech.springstage.core.entity.AbstractEntity;

import javax.persistence.Transient;
import javax.validation.constraints.NotEmpty;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Builder;
import lombok.experimental.Tolerate;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * ClassName: PrivilegeTemplate <br/>
 * Function: 权限模板 <br/>
 * date: 2018-11-20 13:21:52 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="privilege_templates")
public class PrivilegeTemplate extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 名称 
    @Column(name="name", length = 300)
	private String name = null;

	// 所选权限串json 
    @Column(name="codes", length = 300)
	private String codes = null;

	// 是否默认 
    @Column(name="def")
	private Boolean def = false;

	// 操作人
	@Column(name="operator")
	private Long operator = null;

	// 操作人
	@Column(name="operator_name")
	private String operatorName = null;

	// 已关联门店
	@Transient
	private String count = null;

    @Tolerate
	public PrivilegeTemplate() {
		
	}
    @Tolerate
	public PrivilegeTemplate(Long id){
    	super.setId(id);
    }
	
	/**
	 * 获取名称
	 */
	public String getName() {
		return this.name;
	}

    /**
     * 设置名称
     */
	public PrivilegeTemplate setName(String name) {
		this.name = name;
		return this;
	}

	/**
	 * 获取所选权限串json
	 */
	public String getCodes() {
		return this.codes;
	}

    /**
     * 设置所选权限串json
     */
	public PrivilegeTemplate setCodes(String codes) {
		this.codes = codes;
		return this;
	}

	/**
	 * 获取是否默认
	 */
	public Boolean getDef() {
		return this.def;
	}

    /**
     * 设置是否默认
     */
	public PrivilegeTemplate setDef(Boolean def) {
		this.def = def;
		return this;
	}

	public Long getOperator() {
		return operator;
	}

	public void setOperator(Long operator) {
		this.operator = operator;
	}

	public String getOperatorName() {
		return operatorName;
	}

	public void setOperatorName(String operatorName) {
		this.operatorName = operatorName;
	}

	public String getCount() {
		return count;
	}

	public void setCount(String count) {
		this.count = count;
	}
}
